import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "../components/login.vue"
//import afterlogin from "../components/afterlogin.vue"
import main_page from "../components/main_page.vue"
Vue.use(VueRouter)


const routes = [
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
	path: '/main_page',
    name: 'main_page',
    component:main_page
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    //component: () => import(/* webpackChunkName: "about" */ '../components/afterlogin.vue')
  },
  {
    path: '/', 
    redirect: '/login' 
}
]


const router = new VueRouter({
  routes
})

export default router
